import Vue from 'vue'
import App from './App.vue'
import router from './router'

import axios from 'axios'
axios.defaults.baseURL = 'http://127.0.0.1:8899/api/private/v1/'
Vue.prototype.$http = axios

// 请求拦截
// axios.interceptors.request.use(config => {
//   // console.log(config)
//   config.headers.Authorization = window.sessionStorage.getItem('token')
//   // 自命名Authorization属性，方便日后api直接获取
//   // console.log(config.headers.Authorization)
//   return config
// })

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
